<template>
  <div class="app-container">
    <Ht-search-form
      v-show="showSearch"
      :advOptions="[]"
      :dictMap="dictMap"
      :formOptions="formOptions"
      :outputQueryParams="queryParams"
      :queryParams="queryParams"
      :defaultEventKey="defaultEventKey"
      :labelWidth="80"
    ></Ht-search-form>


    <ht-table
      ref="dataTable"
      :dictMap="dictMap"
      :multi-select="false"
      :opButtonList="opButtonList"
      :queryParams="queryParams"
      :reqConfig="regConfig"
      :showSerialNumber="false"
      :tableBindColumns="tableBindColumns"
      :defaultEventKey="defaultEventKey"
    >
      <template v-slot:operate>
        <el-table-column align="left" fixed="right" label="操作" width="50">
          <template slot-scope="scope">
            <ht-button-group
              :buttonList="[
                {
                  label: '明细',
                  doFunc: () => {
                    handleAction('detail', scope.row);
                  },
                },
              ]"
            />
          </template>
        </el-table-column>
      </template>
    </ht-table>

    <el-dialog
      :close-on-click-modal="false"
      :title="title"
      center
      :visible.sync="open"
      v-if="open"
      append-to-body
      width="1024px"
    >
      <el-form ref="detailForm" :model="detailForm" :rules="rules" label-width="120px">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="交易流水号" prop="id">
              <el-input v-model="detailForm.id" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文标识号" prop="pkgId">
              <el-input v-model="detailForm.pkgId" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="内部机构号" prop="brno">
              <el-select style="width: 100%" v-model="detailForm.brno" placeholder="内部机构号" :disabled="true">
                <el-option
                  v-for="dict in dictMap['Cnaps2Dict.CP2_BRNO']"
                  :key="dict.value"
                  :label="`${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="工作日期" prop="workdate">
              <el-date-picker
                v-model="detailForm.workdate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="CPG日期" prop="vdate">
              <el-date-picker
                v-model="detailForm.vdate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文类型" prop="pkgNo">
              <el-select
                style="width: 100%"
                v-model="
                  detailForm.pkgNo === null || detailForm.pkgNo === undefined
                    ? ''
                    : detailForm.pkgNo + '-' + detailForm.pkgNoDesc
                "
                placeholder="报文类型"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="来往账标识" prop="drct">
              <el-select style="width: 100%" v-model="detailForm.drct" placeholder="来往账标识" :disabled="true">
                <el-option
                  v-for="dict in dictMap.DRCTCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="发起方" prop="indirectSender">
              <el-input v-model="detailForm.indirectSender" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="发起方名称" prop="sendername">
              <el-input v-model="detailForm.sendername" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="接收方" prop="indirectRecver">
              <el-input v-model="detailForm.indirectRecver" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="接收方名称" prop="recvername">
              <el-input v-model="detailForm.recvername" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="业务类型" prop="bizType">
              <el-select
                style="width: 100%"
                v-model="
                  detailForm.bizType === null || detailForm.bizType === undefined
                    ? ''
                    : detailForm.bizType + '-' + detailForm.bizTypeDesc
                "
                placeholder="业务类型"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="业务种类" prop="业务种类" v-if="this.detailForm.pkgNo === 'ccms.312.001.01'">
              <el-select
                style="width: 100%"
                v-model="
                  detailForm.bizCtgy === null || detailForm.bizCtgy === undefined
                    ? ''
                    : detailForm.bizCtgy + '-' + detailForm.bizCtgyDesc
                "
                placeholder="业务种类"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="信息标题" prop="msgTitle">
              <el-input v-model="detailForm.msgTitle" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="信息内容" prop="msgContent">
              <el-input type="textarea" v-model="detailForm.msgContent" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="原附件长度" prop="attchmtLength">
              <el-input v-model="detailForm.attchmtLength" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="原附件名称" prop="attchmtName">
              <el-input v-model="detailForm.attchmtName" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <div v-if="this.detailForm.pkgNo !== 'ccms.310.001.01'">
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="回执附件长度" prop="attchmtLength1">
                <el-input v-model="detailForm.attchmtLength1" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="回执附件名称" prop="attchmtName1">
                <el-input v-model="detailForm.attchmtName1" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </div>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="附言" prop="remarks">
              <el-input type="textarea" v-model="detailForm.remarks" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="录入操作员" prop="mdTlrno">
              <el-input v-model="detailForm.mdTlrno" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录入时间" prop="mdTime">
              <el-date-picker
                style="width: 100%"
                v-model="detailForm.mdTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="审核操作员" prop="audTlrno">
              <el-input v-model="detailForm.audTlrno" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核时间" prop="audTime">
              <el-date-picker
                style="width: 100%"
                v-model="detailForm.audTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="审核附言" prop="audRemarks">
              <el-input type="textarea" v-model="detailForm.audRemarks" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="发送时间" prop="sendTime">
              <el-date-picker
                style="width: 100%"
                v-model="detailForm.sendTime"
                value-format="yyyyMMddHHmmss"
                type="sendTime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="接收时间" prop="rcvTime">
              <el-date-picker
                style="width: 100%"
                v-model="detailForm.rcvTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通讯状态" prop="comStatus">
              <el-select style="width: 100%" v-model="detailForm.comStatus" placeholder="通讯状态" :disabled="true">
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="业务状态" prop="txnStatus">
              <el-select style="width: 100%" v-model="detailForm.txnStatus" placeholder="业务状态" :disabled="true">
                <el-option
                  v-for="dict in dictMap.TXN_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="中心状态" prop="procTxnStatus">
              <el-select style="width: 100%" v-model="detailForm.procTxnStatus" placeholder="中心状态" :disabled="true">
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <div v-if="this.detailForm.drct !== '2'">
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="业务处理码" prop="procCode1">
                <el-select
                  style="width: 100%"
                  v-model="
                    detailForm.procCode1 === null || detailForm.procCode1 === undefined
                      ? ''
                      : detailForm.procCode1 + '-' + detailForm.procCode1Desc
                  "
                  placeholder="原业务类型"
                  :disabled="true"
                ></el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="业务拒绝信息" prop="rejectInfo1">
                <el-input type="textarea" v-model="detailForm.rejectInfo1" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </div>

        <div
          v-if="
            this.detailForm.bizType === 'M503' ||
            this.detailForm.bizType === 'M504' ||
            this.detailForm.bizType === 'M505'
          "
        >
          <div v-if="this.detailForm.bizType === 'M505'">
            <div
              v-if="
                this.detailForm.bizCtgy !== '06815' &&
                this.detailForm.bizCtgy !== '06814' &&
                this.detailForm.bizCtgy !== '06816'
              "
            >
              <el-card class="form-card txnInfo-card">
                <div slot="header" class="label-header-msg">
                  <span></span>
                </div>

                <el-row type="flex">
                  <el-col :span="12">
                    <el-form-item label="地域标识" prop="regionid">
                      <el-select
                        style="width: 100%"
                        v-model="detailFormDatatt.regionid"
                        placeholder="地域标识"
                        :disabled="true"
                      >
                        <el-option
                          v-for="dict in dictMap.RegionId"
                          :key="dict.value"
                          :label="`${dict.value}-${dict.text}`"
                          :value="dict.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>

                  <el-col :span="12">
                    <el-form-item label="统一社会信用代码" prop="uniformScCode">
                      <el-input v-model="detailFormDatatt.uniformScCode" :disabled="true" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-card>
            </div>
          </div>
        </div>

        <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06814'">
          <el-card class="form-card txnInfo-card">
            <div slot="header" class="label-header-msg">
              <span>存量协议信息通知</span>
            </div>
            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="地域标识" prop="regionid">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.regionid"
                    placeholder="地域标识"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.RegionId"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="统一社会信用代码" prop="uniformScCode">
                  <el-input v-model="detailFormDatatt.uniformScCode" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="客户号" prop="custId">
                  <el-input v-model="detailFormDatatt.custId" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="入网机构标识号" prop="accsPtyId">
                  <el-input v-model="detailFormDatatt.accsPtyId" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="费项数目" prop="paymentNum">
                  <el-input v-model="detailFormDatatt.paymentNum" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="备注" prop="remarks">
                  <el-input type="textarea" v-model="detailFormDatatt.remarks" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>

          <el-card class="form-card txnInfo-card">
            <div slot="header" class="label-header-msg">
              <span></span>
            </div>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="协议号" prop="protoId">
                  <el-input v-model="detailFormDatatt.protoId" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="开户行行号" prop="accBrno">
                  <el-input v-model="detailFormDatatt.accBrno" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="客户名称" prop="custName">
                  <el-input v-model="detailFormDatatt.custName" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="账户类型" prop="actnoType">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.actnoType"
                    placeholder="账户类型"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.CustomerAccountTypeCode"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="账号/卡号" prop="payerActno">
                  <el-input v-model="detailFormDatatt.payerActno" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="一次扣费限额币种" prop="limitCurcd">
                  <el-input v-model="detailFormDatatt.limitCurcd" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="一次扣费限额" prop="limitAmt">
                  <el-input v-model="detailFormDatatt.limitAmt" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="协议到期日期" prop="contDueDate">
                  <el-date-picker
                    v-model="detailFormDatatt.contDueDate"
                    style="width: 100%"
                    type="date"
                    value-format="yyyyMMdd"
                    :disabled="true"
                  />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="协议签署日期" prop="contSignDate">
                  <el-date-picker
                    v-model="detailFormDatatt.contSignDate"
                    style="width: 100%"
                    type="date"
                    value-format="yyyyMMdd"
                    :disabled="true"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="生效日期" prop="effectDate">
                  <el-date-picker
                    v-model="detailFormDatatt.effectDate"
                    style="width: 100%"
                    type="date"
                    value-format="yyyyMMdd"
                    :disabled="true"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="授权模式" prop="authModel">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.authModel"
                    placeholder="授权模式"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.AuthModelCode"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="缴费人名称" prop="payerName">
                  <el-input v-model="detailFormDatatt.payerName" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="缴费人证件类型" prop="payerIdType">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.payerIdType"
                    placeholder="缴费人证件类型"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.Id_Type_Code"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="缴费人证件号码" prop="payerIdNo">
                  <el-input v-model="detailFormDatatt.payerIdNo" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="联系电话" prop="payerTel">
                  <el-input v-model="detailFormDatatt.payerTel" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="地址" prop="payerAddr">
                  <el-input v-model="detailFormDatatt.payerAddr" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="扣款时间单位" prop="timeUnit">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.timeUnit"
                    placeholder="扣款时间单位"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.TimeUnitCode"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="扣款时间步长" prop="timeStep">
                  <el-input v-model="detailFormDatatt.timeStep" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="扣款时间描述" prop="timeDesc">
                  <el-input type="textarea" v-model="detailFormDatatt.timeDesc" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="扣款周期内限制笔数" prop="cycLimitNum">
                  <el-input v-model="detailFormDatatt.cycLimitNum" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="扣款周期内扣费限额币种" prop="cycLimitCurcd">
                  <el-input v-model="detailFormDatatt.cycLimitCurcd" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="扣款周期内扣费限额" prop="amount">
                  <ht-amount-input
                    v-model="detailFormDatatt.amount"
                    placeholder="金额"
                    :disable="true"
                  ></ht-amount-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="协议状态" prop="contStatus">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.contStatus"
                    placeholder="协议状态"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.ContractStatusCode"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="协议导入日期" prop="impContDate" :disabled="true">
                  <el-date-picker
                    v-model="detailFormDatatt.impContDate"
                    style="width: 100%"
                    type="date"
                    value-format="yyyyMMdd"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <ht-table
              ref="dataTable"
              :dictMap="dictMap"
              :multi-select="false"
              :opButtonList="opButtonList"
              :queryParams="queryDetailParams"
              :reqConfig="regConfig06813"
              :showSerialNumber="false"
              :tableBindColumns="tableBindColumns06813"
            ></ht-table>
          </el-card>
        </div>

        <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06815'">
          <el-card class="form-card txnInfo-card">
            <div slot="header" class="label-header-msg">
              <span>代收付中心入网机构信息</span>
            </div>
            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="地域标识" prop="regionid">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.regionid"
                    placeholder="地域标识"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.RegionId"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="统一社会信用代码" prop="uniformScCode">
                  <el-input v-model="detailFormDatatt.uniformScCode" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="信息类型" prop="infoType">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.infoType"
                    placeholder="信息类型"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.INFO_TYPE"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="变更期数" prop="chngNum">
                  <el-input v-model="detailFormDatatt.chngNum" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="备注" prop="remarks">
                  <el-input type="textarea" v-model="detailFormDatatt.remarks" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <ht-table
              ref="dataTable"
              :dictMap="dictMap"
              :multi-select="false"
              :opButtonList="opButtonList"
              :queryParams="queryDetailParams"
              :reqConfig="regConfig06814"
              :showSerialNumber="false"
              :tableBindColumns="tableBindColumns06814"
            >
              <template v-slot:operate>
                <el-table-column align="left" fixed="right" label="操作" width="50">
                  <template slot-scope="scope">
                    <ht-button-group
                      :buttonList="[
                        {
                          label: '明细',
                          doFunc: () => {
                            handleAction('detail06814', scope.row);
                          },
                        },
                      ]"
                    />
                  </template>
                </el-table-column>
              </template>
            </ht-table>
          </el-card>
        </div>
        <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06816'">
          <el-card class="form-card txnInfo-card">
            <div slot="header" class="label-header-msg">
              <span>入网机构和费项关系信息</span>
            </div>
            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="地域标识" prop="regionid">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.regionid"
                    placeholder="地域标识"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.RegionId"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="统一社会信用代码" prop="uniformScCode">
                  <el-input v-model="detailFormDatatt.uniformScCode" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="信息类型" prop="infoType">
                  <el-select
                    style="width: 100%"
                    v-model="detailFormDatatt.infoType"
                    placeholder="信息类型"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.INFO_TYPE"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="变更期数" prop="chngNum">
                  <el-input v-model="detailFormDatatt.chngNum" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="备注" prop="remarks">
                  <el-input type="textarea" v-model="detailFormDatatt.remarks" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <ht-table
              ref="dataTable"
              :dictMap="dictMap"
              :multi-select="false"
              :opButtonList="opButtonList"
              :queryParams="queryDetailParams"
              :reqConfig="regConfig06815"
              :showSerialNumber="false"
              :tableBindColumns="tableBindColumns06815"
            >
              <template v-slot:operate>
                <el-table-column align="left" fixed="right" label="操作" width="50">
                  <template slot-scope="scope">
                    <ht-button-group
                      :buttonList="[
                        {
                          label: '明细',
                          doFunc: () => {
                            handleAction('detail06815', scope.row);
                          },
                        },
                      ]"
                    />
                  </template>
                </el-table-column>
              </template>
            </ht-table>
          </el-card>
        </div>
        <div v-if="this.detailForm.bizStatus !== ''">
          <el-card class="form-card txnInfo-card">
            <div slot="header" class="label-header-msg">
              <span>通用应答信息</span>
            </div>
            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="交易流水号" prop="id1">
                  <el-input v-model="detailForm.id1" :disabled="true" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="报文标识号" prop="pkgId1">
                  <el-input v-model="detailForm.pkgId1" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="应答业务状态" prop="bizStatus">
                  <el-select
                    style="width: 100%"
                    v-model="detailForm.bizStatus"
                    placeholder="应答业务状态"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.PROCESSSTATUS"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="拒绝处理码" prop="bizRejectCode">
                  <el-select
                    style="width: 100%"
                    v-model="
                      detailForm.bizRejectCode === null || detailForm.bizRejectCode === undefined
                        ? ''
                        : detailForm.bizRejectCode + '-' + detailForm.bizRejectCodeDesc
                    "
                    placeholder="拒绝处理码"
                    :disabled="true"
                  ></el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="业务拒绝信息" prop="rejectInfo">
                  <el-input type="textarea" v-model="detailForm.bizRejectInfo" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="业务处理参与机构" prop="bizProOrg">
                  <el-input v-model="detailForm.bizProOrg" :disabled="true" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="业务处理参与机构名称" prop="bizProOrgNAME">
                  <el-input v-model="detailForm.bizProOrgNAME" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="附言" prop="reREMARKS">
                  <el-input type="textarea" v-model="detailForm.reREMARKS" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="录入操作员" prop="md1Tlrno">
                  <el-input v-model="detailForm.md1Tlrno" :disabled="true" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="录入时间" prop="md1Time">
                  <el-date-picker
                    style="width: 100%"
                    v-model="detailForm.md1Time"
                    value-format="yyyyMMddHHmmss"
                    type="datetime"
                    :disabled="true"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="审核操作员" prop="aud1Tlrno">
                  <el-input v-model="detailForm.aud1Tlrno" :disabled="true" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="审核时间" prop="aud1Time">
                  <el-date-picker
                    style="width: 100%"
                    v-model="detailForm.aud1Time"
                    value-format="yyyyMMddHHmmss"
                    type="datetime"
                    :disabled="true"
                  />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="审核附言" prop="aud1Remarks">
                  <el-input type="textarea" v-model="detailForm.aud1Remarks" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="通讯状态" prop="status1">
                  <el-select style="width: 100%" v-model="detailForm.status1" placeholder="通讯状态" :disabled="true">
                    <el-option
                      v-for="dict in dictMap.PKG_STATUS"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="业务状态" prop="txnStatus1">
                  <el-select
                    style="width: 100%"
                    v-model="detailForm.txnStatus1"
                    placeholder="业务状态"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.TXN_STATUS"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="12">
                <el-form-item label="中心状态" prop="procStatus1">
                  <el-select
                    style="width: 100%"
                    v-model="detailForm.procStatus1"
                    placeholder="中心状态"
                    :disabled="true"
                  >
                    <el-option
                      v-for="dict in dictMap.PROCESSSTATUS"
                      :key="dict.value"
                      :label="`${dict.value}-${dict.text}`"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="业务处理码" prop="procCode2">
                  <el-select
                    style="width: 100%"
                    v-model="
                      detailForm.procCode2 === null || detailForm.procCode2 === undefined
                        ? ''
                        : detailForm.procCode2 + '-' + detailForm.procCode2Desc
                    "
                    placeholder="业务处理码"
                    :disabled="true"
                  ></el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row type="flex">
              <el-col :span="24">
                <el-form-item label="业务拒绝信息" prop="rejectInfo2">
                  <el-input type="textarea" v-model="detailForm.rejectInfo2" :disabled="true" />
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>

          <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06815'">
            <el-card class="form-card txnInfo-card">
              <div slot="header" class="label-header-msg">
                <span>代收付中心入网机构信息</span>
              </div>
              <el-row type="flex">
                <el-col :span="12">
                  <el-form-item label="信息类型" prop="infoType">
                    <el-select
                      style="width: 100%"
                      v-model="detailFormDatat.infoType"
                      placeholder="信息类型"
                      :disabled="true"
                    >
                      <el-option
                        v-for="dict in dictMap.INFO_TYPE"
                        :key="dict.value"
                        :label="`${dict.value}-${dict.text}`"
                        :value="dict.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row type="flex">
                <el-col :span="12">
                  <el-form-item label="业务状态" prop="procStatus">
                    <el-select
                      style="width: 100%"
                      v-model="detailFormDatat.procStatus"
                      placeholder="业务状态"
                      :disabled="true"
                    >
                      <el-option
                        v-for="dict in dictMap.PROCESSSTATUS"
                        :key="dict.value"
                        :label="`${dict.value}-${dict.text}`"
                        :value="dict.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="变更期数" prop="chngNum">
                    <el-input v-model="detailFormDatat.chngNum" :disabled="true" />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row type="flex">
                <el-col :span="24">
                  <el-form-item label="备注" prop="remarks">
                    <el-input type="textarea" v-model="detailFormDatat.remarks" :disabled="true" />
                  </el-form-item>
                </el-col>
              </el-row>

              <ht-table
                ref="dataTable"
                :dictMap="dictMap"
                :multi-select="false"
                :opButtonList="opButtonList"
                :queryParams="queryDetailParams1"
                :reqConfig="regConfig068141"
                :showSerialNumber="false"
                :tableBindColumns="tableBindColumns068141"
              >
                <template v-slot:operate>
                  <el-table-column align="left" fixed="right" label="操作" width="50">
                    <template slot-scope="scope">
                      <ht-button-group
                        :buttonList="[
                          {
                            label: '明细',
                            doFunc: () => {
                              handleAction('detail068141', scope.row);
                            },
                          },
                        ]"
                      />
                    </template>
                  </el-table-column>
                </template>
              </ht-table>
            </el-card>
          </div>

          <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06816'">
            <el-card class="form-card txnInfo-card">
              <div slot="header" class="label-header-msg">
                <span>入网机构和费项关系信息</span>
              </div>
              <el-row type="flex">
                <el-col :span="12">
                  <el-form-item label="信息类型" prop="infoType">
                    <el-select
                      style="width: 100%"
                      v-model="detailFormDatat.infoType"
                      placeholder="信息类型"
                      :disabled="true"
                    >
                      <el-option
                        v-for="dict in dictMap.INFO_TYPE"
                        :key="dict.value"
                        :label="`${dict.value}-${dict.text}`"
                        :value="dict.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row type="flex">
                <el-col :span="12">
                  <el-form-item label="业务状态" prop="procStatus">
                    <el-select
                      style="width: 100%"
                      v-model="detailFormDatat.procStatus"
                      placeholder="业务状态"
                      :disabled="true"
                    >
                      <el-option
                        v-for="dict in dictMap.PROCESSSTATUS"
                        :key="dict.value"
                        :label="`${dict.value}-${dict.text}`"
                        :value="dict.value"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="变更期数" prop="chngNum">
                    <el-input v-model="detailFormDatat.chngNum" :disabled="true" />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row type="flex">
                <el-col :span="24">
                  <el-form-item label="备注" prop="remarks">
                    <el-input type="textarea" v-model="detailFormDatat.remarks" :disabled="true" />
                  </el-form-item>
                </el-col>
              </el-row>

              <ht-table
                ref="dataTable"
                :dictMap="dictMap"
                :multi-select="false"
                :opButtonList="opButtonList"
                :queryParams="queryDetailParams1"
                :reqConfig="regConfig068151"
                :showSerialNumber="false"
                :tableBindColumns="tableBindColumns068151"
              >
                <template v-slot:operate>
                  <el-table-column align="left" fixed="right" label="操作" width="50">
                    <template slot-scope="scope">
                      <ht-button-group
                        :buttonList="[
                          {
                            label: '明细',
                            doFunc: () => {
                              handleAction('detail068151', scope.row);
                            },
                          },
                        ]"
                      />
                    </template>
                  </el-table-column>
                </template>
              </ht-table>
            </el-card>
          </div>
        </div>
        <div v-if="this.detailForm.bizType === 'M505' && this.detailForm.bizCtgy === '06807'">
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文标识号" prop="retnOriPkgId">
                <el-input v-model="detailFormDatatt.retnOriPkgId" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="发起参与机构" prop="retnOriSender">
                <el-input v-model="detailFormDatatt.retnOriSender" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="报文类型" prop="retnOriMsgType">
                <el-input v-model="detailFormDatatt.retnOriMsgType" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <ht-table
            ref="dataTable"
            :dictMap="dictMap"
            :multi-select="false"
            :opButtonList="opButtonList"
            :queryParams="queryDetailParams2"
            :reqConfig="regConfig068107"
            :showSerialNumber="false"
            :tableBindColumns="tableBindColumns068107"
          ></ht-table>
        </div>

        <div
          v-if="
            this.detailForm.bizType === 'M505' &&
            this.detailForm.bizCtgy === '06808' &&
            this.detailForm.regionid === '320500'
          "
        >
          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原报文标识号" prop="oriPkgId">
                <el-input v-model="detailFormDatatt.oriPkgId" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="原发起参与机构" prop="oriSender">
                <el-input v-model="detailFormDatatt.oriSender" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原报文类型" prop="oriMsgType">
                <el-input v-model="detailFormDatatt.oriMsgType" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原报文标识号" prop="oriBizPkgId">
                <el-input v-model="detailFormDatatt.oriBizPkgId" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="原发起参与机构" prop="oriBizSedr">
                <el-input v-model="detailFormDatatt.oriBizSedr" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="原报文类型" prop="oriBizMsgType">
                <el-input v-model="detailFormDatatt.oriBizMsgType" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="借贷标志" prop="drct">
                <el-select style="width: 100%" v-model="detailFormDatatt.drct" placeholder="借贷标志" :disabled="true">
                  <el-option
                    v-for="dict in dictMap.DRCT_312"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="票据种类" prop="billtype">
                <el-input v-model="detailFormDatatt.billtype" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="凭证号" prop="certno">
                <el-input v-model="detailFormDatatt.certno" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="签发日期" prop="issuedate">
                <el-date-picker
                  v-model="detailFormDatatt.issuedate"
                  style="width: 100%"
                  type="date"
                  value-format="yyyyMMdd"
                  :disabled="true"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款人名称" prop="payerName">
                <el-input v-model="detailFormDatatt.payerName" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="付款人账号" prop="payerActno">
                <el-input v-model="detailFormDatatt.payerActno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="付款行行号" prop="payerBrno">
                <el-input v-model="detailFormDatatt.payerBrno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款人名称" prop="payeeName">
                <el-input v-model="detailFormDatatt.payeeName" :disabled="true" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="收款人账号" prop="payeeActno">
                <el-input v-model="detailFormDatatt.payeeActno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="收款行行号" prop="payeeBrno">
                <el-input v-model="detailFormDatatt.payeeBrno" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="货币币种" prop="curcd">
                <el-input v-model="detailFormDatatt.curcd" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="钞汇类型" prop="cashtype">
                <el-input v-model="detailFormDatatt.cashtype" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="12">
              <el-form-item label="结算金额币种" prop="amtcurcd">
                <el-input v-model="detailFormDatatt.amtcurcd" :disabled="true" />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="交易金额" prop="amount">
                <ht-amount-input v-model="detailFormDatatt.amount" placeholder="金额" :disable="true"></ht-amount-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="事由用途" prop="purpose">
                <el-input type="textarea" v-model="detailFormDatatt.purpose" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row type="flex">
            <el-col :span="24">
              <el-form-item label="打印信息" prop="printinfo">
                <el-input type="textarea" v-model="detailFormDatatt.printinfo" :disabled="true" />
              </el-form-item>
            </el-col>
          </el-row>
        </div>
      </el-form>

      <div slot="footer" align="center" class="dialog-footer">
        <el-button type="primary" v-if="this.detailForm.attchmtLength !== '0'" @click="downloadFile(detailForm.attchmtContent,detailForm.attchmtName)">
          下载原报文附件
        </el-button>
        <el-button
          type="primary"
          v-if="this.detailForm.attchmtLength1 !== '0' && this.detailForm.pkgNo !== 'ccms.310.001.01'"
          @click="downloadFile(detailForm.attchmtContent1,detailForm.attchmtName1)"
        >
          下载应答录入附件
        </el-button>
        <el-button type="primary" @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>

    <general-information-query-detail
      ref="generalInformationQueryDetail"
      :dictMap="dictMap"
    ></general-information-query-detail>
  </div>
</template>

<script>
import {
  apiUrlConfigQuery06807,
  apiUrlConfigQuery06813,
  apiUrlConfigQuery06814,
  apiUrlConfigQuery068141,
  apiUrlConfigQuery06815,
  apiUrlConfigQuery068151,
  apiUrlConfigQueryQuery,
  generalInformationQueryDetail14,
  generalInformationQueryDetail141,
  generalInformationQueryDetail15,
  generalInformationQueryDetail151,
  generalInformationQuerydownload,
  generalInformationQuerydownload1,
  generalInforQueryDetail,
} from "@/api/cnaps/ccms/310";
import { listPageMixin } from "@/libs/listPageMixin";
import HtAmountInput from "@/views/components/HtAmountInput";
import generalInformationQueryDetail from "./general_information_query_detail";
import { mapGetters } from "vuex";
import { baseUrlConfig, downloadfile } from "@/api/authority_app/base";
export default {
  name: "GeneralInformationQuery",
  mixins: [listPageMixin],
  components: { HtAmountInput, generalInformationQueryDetail },
  computed: {
    ...mapGetters(["globalBusData"]),
  },
  created() {
    this.$set(this.queryParams, "brno", this.globalBusData.brno);
  },
  watch: {
    globalBusData: {
      handler(val) {
        this.$set(this.queryParams, "brno", val.brno);
      },
      deep: true,
      immediate: true,
    },
  },
  data() {
    let self = this;
    return {
      defaultEventKey: "defaultEventKey",
      // 查询参数
      queryParams: {
        workdate1: "",
        workdate2: "",
        idSeqNo: "",
        brno: "",
        mestype: "",
      },
      queryDetailParams: {},
      queryDetailParams1: {},
      queryDetailParams2: {},
      entryDetailForm: {
        pkgNo: undefined,
      },

      // 搜索
      formOptions: [],
      //
      searchFormDictList: [
        "PKG_310_312",
        "Branch",
        "Cnaps2Dict.CP2_BRNO",
        "SYSTEMCODE",
        "PKG_310_312",
        "DRCTCODE",
        "PKG_STATUS",
        "PROCESSSTATUS",
        "TXN_STATUS",
        "CustomerAccountTypeCode",
        "AuthModelCode",
        "Id_Type_Code",
        "TimeUnitCode",
        "INFO_TYPE",
        "DRCT_312",
        "RegionId",
        "CHANGECODE",
        "EFFECTIVECODE",
        "DirectAndIndirectFlag",
        "OrgStatus",
        "CheckMode",
        "LinkMode",
        "AgreementCheckFlag",
        "BillPaymentMode",
        "PaymentMode",
        "FeeAmountFlag",
      ],
      // 列信息
      regConfig: apiUrlConfigQueryQuery,

      regConfig06813: apiUrlConfigQuery06813,

      regConfig06814: apiUrlConfigQuery06814,

      regConfig06815: apiUrlConfigQuery06815,

      regConfig068141: apiUrlConfigQuery068141,

      regConfig068151: apiUrlConfigQuery068151,

      regConfig068107: apiUrlConfigQuery06807,

      tableBindColumns: [
        { prop: "brno", label: "内部机构号", dictCode: "Cnaps2Dict.CP2_BRNO", width: 120 },
        { prop: "id", label: "交易流水号", width: 180 },
        { prop: "pkgId", label: "报文标识号", width: 180 },
        { prop: "workdate", label: "工作日期", type: "date", width: 120 },
        { prop: "vdate", label: "CPG日期", type: "date", width: 120 },
        { prop: "sysCode", label: "系统编号", dictCode: "SYSTEMCODE", width: 120 },
        { prop: "pkgNo", label: "报文类型", dictCode: "PKG_310_312", width: 180 },
        { prop: "drct", label: "来往账标识", dictCode: "DRCTCODE", width: 120 },
        { prop: "comStatus", label: "通讯状态", dictCode: "PKG_STATUS", width: 120 },
        { prop: "procStatus", label: "中心状态", dictCode: "PROCESSSTATUS", width: 120 },
      ],

      tableBindColumns06813: [
        {
          prop: "bizCtgyCode",
          label: "业务种类编码",
          formatter(row, text, index) {
            return row["bizCtgyCode"] + "-" + row["bizCtgyCodeDesc"];
          },
        },
      ],

      tableBindColumns06814: [
        { prop: "id", label: "序号", width: 120 },
        { prop: "chgType", label: "变更类型", dictCode: "CHANGECODE", width: 120 },
        { prop: "efftType", label: "生效类型", dictCode: "EFFECTIVECODE", width: 120 },
        { prop: "efftDate", label: "生效日期", type: "date", width: 120 },
        { prop: "inEffDate", label: "失效日期", type: "date", width: 120 },
        { prop: "regionid", label: "地域标识", dictCode: "RegionId", width: 120 },
        { prop: "acsOrgId", label: "入网机构标识号", width: 180 },
      ],

      tableBindColumns06815: [
        { prop: "id", label: "序号", width: 120 },
        { prop: "chgType", label: "变更类型", dictCode: "CHANGECODE", width: 120 },
        { prop: "efftType", label: "生效类型", dictCode: "EFFECTIVECODE", width: 120 },
        { prop: "efftDate", label: "生效日期", type: "date", width: 120 },
        { prop: "inEfftDate", label: "失效日期", type: "date", width: 120 },
        { prop: "regionid", label: "地域标识", dictCode: "RegionId", width: 120 },
        { prop: "acsOrgId", label: "入网机构标识号", width: 180 },
      ],

      tableBindColumns068141: [
        { prop: "id", label: "序号", width: 120 },
        { prop: "chgType", label: "变更类型", dictCode: "CHANGECODE", width: 120 },
        { prop: "efftType", label: "生效类型", dictCode: "EFFECTIVECODE", width: 120 },
        { prop: "efftDate", label: "生效日期", type: "date,width:120" },
        { prop: "inEffDate", label: "失效日期", type: "date", width: 120 },
        { prop: "regionid", label: "地域标识", dictCode: "RegionId", width: 120 },
        { prop: "acsOrgId", label: "入网机构标识号", width: 180 },
      ],

      tableBindColumns068151: [
        { prop: "id", label: "序号", width: 120 },
        { prop: "chgType", label: "变更类型", dictCode: "CHANGECODE", width: 120 },
        { prop: "efftType", label: "生效类型", dictCode: "EFFECTIVECODE", width: 120 },
        { prop: "efftDate", label: "生效日期", type: "date", width: 120 },
        { prop: "inEffDate", label: "失效日期", type: "date", width: 120 },
        { prop: "regionid", label: "地域标识", dictCode: "RegionId", width: 120 },
        { prop: "acsOrgId", label: "入网机构标识号", width: 180 },
      ],

      tableBindColumns068107: [
        { prop: "oriPkgId", label: "原报文标识号", width: 120 },
        { prop: "oriSender", label: "原发起参与机构", width: 120 },
        { prop: "oriMsgType", label: "原报文类型", width: 120 },
        { prop: "oriIndtSender", label: "原发起间接参与机构", width: 180 },
        { prop: "oriIndtRcv", label: "原接收间接参与机构", width: 180 },
        { prop: "oriDtlNo", label: "原明细标识号", width: 180 },
        {
          prop: "oriBizCode",
          label: "原业务类型编码",
          formatter(row, text, index) {
            return row["oriBizCode"] + "-" + row["oriBizCodeDesc"];
          },
          width: 180,
        },
        { prop: "retnReason", label: "退汇原因", width: 180 },
      ],

      dictMapAsync: {},
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,

      openDetail: false,
      // 表单参数
      detailForm: {},
      detailFormDatatt: {},
      detailFormDatat: {},
      totalRecord: 0,
      totalPage: 0,
      needCount: 0,
      rules: {},
    };
  },
  mounted() {
    const formOptions = [
      // 普通搜索
      {
        type: "input",
        prop: "idSeqNo",
        defaultAttr: {
          size: "small",
          label: "交易流水号",
          placeholder: "请输入交易流水号",
        },
      },
      {
        type: "dates",
        nameObj: {
          startTimeName: "workdate1",
          endTimeName: "workdate2",
        },
        defaultAttr: {
          size: "small",
          label: "工作日期",
          placeholder: ["请输入工作开始日期", "请输入工作结束日期"],
          format: "yyyy-MM-dd",
          valueFormat: "yyyyMMdd",
        },
      },
      {
        type: "search-dept-tree",
        prop: "brno",
        defaultAttr: {
          radio: false,
          linkParentChoose: false,
          label: "分行选择",
          placeholder: "请选择分行",
        },
      },

      {
        type: "dict",
        dict: "PKG_310_312",
        prop: "mestype",
        defaultAttr: {
          size: "small",
          label: "报文类型",
          placeholder: "请输入报文类型",
        },
      },
    ];
    this.formOptions = formOptions;
    this.dictMapAsync = this.getDictMap();
  },
  methods: {
    /***
     * 按钮操作汇总
     */
    /***
     * 按钮操作汇总
     */
    /** 搜索按钮操作 */

    handleAction(type, row = {}) {
      switch (type) {
        case "detail":
          this.handleDetail(row);
          break;
        case "detail06814":
          this.handleDetail06814(row);
          break;
        case "detail06815":
          this.handleDetail06815(row);
          break;
        case "detail068141":
          this.handleDetail068141(row);
          break;
        case "detail068151":
          this.handleDetail068151(row);
          break;
      }
    },

    // 关闭按钮
    cancel() {
      this.open = false;
    },

    /** 详情按钮操作 */
    handleDetail(row) {
      this.title = "通用信息查询明细";
      this.detailForm = row;
      generalInforQueryDetail(row).then((response) => {
        this.detailForm = response.result.data;
        if (response.result.datatt !== null) {
          this.detailFormDatatt = response.result.datatt;
        }
        if (response.result.datat !== null) {
          this.detailFormDatat = response.result.datat;
        }
        this.queryDetailParams.id = response.result.data.id;
        this.queryDetailParams1.id1 = response.result.data.id1;
        this.queryDetailParams2.pkgId = response.result.data.pkgId;

        this.open = true;
      });
    },

    handleDetail06814(row) {
      generalInformationQueryDetail14(row).then((response) => {
        this.$refs.generalInformationQueryDetail.show06814(response.result);
      });
    },

    handleDetail06815(row) {
      generalInformationQueryDetail15(row).then((response) => {
        this.$refs.generalInformationQueryDetail.show06815(response.result);
      });
    },

    handleDetail068141(row) {
      generalInformationQueryDetail141(row).then((response) => {
        this.$refs.generalInformationQueryDetail.show068141(response.result);
      });
    },

    handleDetail068151(row) {
      generalInformationQueryDetail151(row).then((response) => {
        this.$refs.generalInformationQueryDetail.show068151(response.result);
      });
    },

    downloadFile(fileId,fileName) {
      if (fileId !== undefined && fileId !== "") {
        downloadfile(`${baseUrlConfig.downloadFile}`, fileId).then((response) => {
          let type = fileName.split(".")[1];
          let blob = new Blob([response.data], {type: type});
          let objectUrl = URL.createObjectURL(blob);
          const link = document.createElement("a"); // 创建a标签
          link.href = objectUrl;
          // const fileNameSplit = response.headers['content-disposition'].split('=')
          // const fileName = decodeURI(fileNameSplit[fileNameSplit.length - 1]) // 跟后端约定好最后一个值为fileName字段
          link.download = fileName; // 自定义文件名

          link.click(); // 下载文件
          URL.revokeObjectURL(objectUrl); // 释放内存
        });
      } else {
        this.msgError("下载文件不存在");
      }
    },
  },
};
</script>
